package com.mls.fivedistrict.server.impl;

import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mls.fivedistrict.dao.GoodsPayIntegralMapper;
import com.mls.fivedistrict.pojo.GoodsPayIntegral;
import com.mls.fivedistrict.server.GoodsPayIntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Five Team
 * @since 2018-05-15
 */
@Service
public class GoodsPayIntegralServiceImpl extends ServiceImpl<GoodsPayIntegralMapper, GoodsPayIntegral> implements GoodsPayIntegralService {

    @Override
    public GoodsPayIntegral selectGoodsPayIntegralByIntegral(Long goodsId, Long integralId) {
        Wrapper wrapper = Condition.create();
        wrapper.eq("goods_id", goodsId);
        wrapper.eq("integral_id", integralId);
        GoodsPayIntegral goodsPayIntegral = selectOne(wrapper);
        return goodsPayIntegral;
    }
}
